package com.wangshouyu.mp.message;

import com.thoughtworks.xstream.annotations.XStreamAlias;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 11:14
 * @description 响应图片消息
 */
@XStreamAlias("xml")
public class ResponseImageMessage extends BaseMessage{

    /**
     * 图片消息
     */
    @XStreamAlias("Image")
    private ImageMessage image;

    public ImageMessage getImage() {
        return image;
    }

    public void setImage(ImageMessage image) {
        this.image = image;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ResponseImageMessage that = (ResponseImageMessage) o;
        return Objects.equals(image, that.image);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), image);
    }

    @Override
    public String toString() {
        return "ResponseImageMessage{" +
                "image=" + image +
                '}';
    }
}
